package com.marvin.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.marvin.core.Blog;
import com.marvin.core.BlogCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yinyin
 * @create 2021/11/15 下午 3:39
 */
public interface BlogMapper extends BaseMapper<Blog> {

    //查找blog对应的年份有哪些
    List<String> queryYear();

    //根据年份查找该年份的blog
    IPage<Blog> queryBlogByYear(Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);

}
